package com.example.demo.day.config.learn.designBook.part10Template.part1;

public class HummerH1Model extends HummerModel {

    @Override
    public void start() {
        System.out.println("悍马H1发动....");
    }

    @Override
    public void stop() {
        System.out.println("悍马H1停车....");
    }

    @Override
    public void alarm() {
        System.out.println("悍马H1鸣笛....");
    }

    @Override
    public void engineBoom() {
        System.out.println("悍马H1引擎声音是这样在....");
    }

    @Override
    public void run() {
        //首先要发动汽车
        this.start();
        //引擎开始轰鸣
        this.engineBoom();
        //然后就开始跑了，跑的过程中遇到一条狗挡路，就按喇叭
        this.alarm();
        //到达目的地就停车
        this.stop();
    }
}
